-- GENERATED SPELL FOR [Spellbound Attendant] --


function spell0_22959(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(41395,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22959', 5295, 1)
end

function spell1_22959(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(41396,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22959', 9000, 1)
end

function Sorts_22959(pUnit, Event)
local choix_sorts_22959 = math.random(0, 1)
if choix_sorts_22959 == 0 then
pUnit:RegisterEvent('spell0_22959', 1, 1)
end
if choix_sorts_22959 == 1 then
pUnit:RegisterEvent('spell1_22959', 1, 1)
end
end

function mob22959_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22959', math.random(1500, 3000), 1)
end

function mob22959_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22959_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22959_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22959, 1, 'mob22959_Action')
RegisterUnitEvent(22959, 2, 'mob22959_Leave')
RegisterUnitEvent(22959, 3, 'mob22959_Kill')
RegisterUnitEvent(22959, 4, 'mob22959_Die')
